package org.funtester.performance.books.chapter02.section2;

public class SynchronizedDemoSixth {

    public static void main(String[] args) {

        for (int i = 0; i < 3; i++) {
            new Thread(() -> {
                test();
            }).start();
        }

    }


    public static synchronized  void test() {
        try {
            Thread.sleep(100);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        System.out.println(System.currentTimeMillis() + "  Hello FunTester!  " + Thread.currentThread().getName());
    }


}
